<template>
  <div class="roomCheck" style="margin-top: 10px;margin-left: 15px;margin-right: 15px">
    <div class="query">
      <el-form :inline="true" :model="checkQuery" class="demo-form-inline">
        <el-form-item label="手机号">
          <el-input v-model="checkQuery.phone" placeholder="请输入入户人手机号"></el-input>
        </el-form-item>
        <el-form-item label="房间号">
          <el-input v-model="checkQuery.room_num" placeholder="请输入房间号"></el-input>
        </el-form-item>


        <el-form-item label="入住时间">
          <el-col :span="8">
            <el-date-picker type="date" value-format="yyyy-MM-dd" placeholder="选择开始日期"
                            v-model="checkQuery.start_date" style="width: 100%;"></el-date-picker>
          </el-col>
          <el-col class="line" :span="2" style="text-align: center">-</el-col>
          <el-col :span="8">
            <el-date-picker type="date" value-format="yyyy-MM-dd" placeholder="选择结束日期"
                            v-model="checkQuery.end_date" style="width: 100%;"></el-date-picker>
          </el-col>
        </el-form-item>

        <el-form-item>
          <el-button type="primary" @click="getCheckList">查询</el-button>
          <el-button type="primary" @click="checkInShow=true">入住登记</el-button>
        </el-form-item>

      </el-form>
    </div>
    <div class="table"></div>

    <div class="dialog">

      <!--   入住登记新增  start -->
      <el-dialog title="入住登记" :visible.sync="checkInShow" width="20%">
          <el-form :model="roomCheckInfo" label-width="100px">
            <el-form-item label="房间号">
              <el-input style="width: 80%" v-model="roomCheckInfo.room_num" autocomplete="off"
                        placeholder="请输入房间号"></el-input>
            </el-form-item>
            <el-form-item label="入住人">
              <el-input style="width: 80%" v-model="roomCheckInfo.user_name" autocomplete="off"
                        placeholder="请输入名称"></el-input>
            </el-form-item>
            <el-form-item label="入住人手机">
              <el-input style="width: 80%" v-model="roomCheckInfo.user_phone" autocomplete="off"
                        placeholder="请输入手机号"></el-input>
            </el-form-item>
            <el-form-item label="入住时间">
              <el-date-picker type="date" value-format="yyyy-MM-dd" placeholder="请选择入住日期"
                              v-model="roomCheckInfo.start_date" :picker-options="pickerOptionsStart"
                              style="width: 80%"></el-date-picker>
            </el-form-item>
            <el-form-item label="退房时间">
              <el-date-picker type="date" value-format="yyyy-MM-dd" placeholder="请选择退房日期"
                              v-model="roomCheckInfo.end_date" :picker-options="pickerOptionsEnd"
                              style="width: 80%"></el-date-picker>
            </el-form-item>


          </el-form>

        <div slot="footer" class="dialog-footer">
          <el-button @click="checkInShow = false">取 消</el-button>
          <el-button type="primary" @click="checkAdd()">确 定</el-button>
        </div>

      </el-dialog>
      <!--   入住登记新增  end -->

    </div>

  </div>
</template>

<script src="./_roomCheck.js" lang="js"></script>
<style src="./_roomCheck.scss" lang="scss" scoped></style>
